/*
* created by Administrator on 2018/12/7
* 好的代码像粥一样,是得用时间和精力熬的。
*/
const qiniuSDK = require('qiniu');
const QINIU_CONFIG = {
    AK: 'XA_epOBF2BxCteDG70lSSFBIA0rzCABvvqVAbDd1',
    SK: 'w-hLWBpZwBBkW-v0jWGjSw-hS0klG5mzrqrAGY4E',
};

let mac = new qiniuSDK.auth.digest.Mac(QINIU_CONFIG.AK,QINIU_CONFIG.SK);
const OPTION = {
    scope: 'xiongyi',
    exports: 3600*2
};

const putPolicy = new qiniuSDK.rs.PutPolicy(OPTION);
console.log(putPolicy.uploadToken(mac));
module.exports = putPolicy.uploadToken(mac);
